package com.keba.lamp.system.manager.system.impl;

import com.keba.basic.base.manager.impl.SuperManagerImpl;
import com.keba.basic.utils.CollHelper;
import com.keba.lamp.model.constant.EchoApi;
import com.keba.lamp.system.entity.application.DefApplication;
import com.keba.lamp.system.entity.system.DefArea;
import com.keba.lamp.system.manager.system.DefAreaManager;
import com.keba.lamp.system.mapper.system.DefAreaMapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.Map;
import java.util.Set;

/**
 * <p>
 * 通用业务实现类
 * 地区表
 * </p>
 *
 * @author zuihou
 * @date 2021-10-13
 * @create [2021-10-13] [zuihou] [代码生成器生成]
 */
@Slf4j
@Service(EchoApi.DEF_AREA_SERVICE_IMPL_CLASS)
@RequiredArgsConstructor
public class DefAreaManagerImpl extends SuperManagerImpl<DefAreaMapper, DefArea> implements DefAreaManager {

    @Override
    public Map<Serializable, Object> findByIds(Set<Serializable> ids) {
        return CollHelper.uniqueIndex(listByIds(ids), DefArea::getId, DefArea::getName);
    }
}
